﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EMGunSharp
{
    class LinaritySlider
    {
        LinearityMapper mapper;

        public LinaritySlider()
        {
            mapper = new LinearityMapper();
        }
        public void Add(double posx, double dx, double dy)
        {
            mapper.AddPoint(posx, dy / dx);
        }
        public double ReadDy(double posx, double dx)
        {
            var k = mapper.MapX2Y(posx);
            return dx * k;
        }
    }
}
